package org.springblade.modules.repair.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.repair.entity.MaintainPartsWork;
import org.springblade.modules.repair.vo.plan.CheckChildPlanVo;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @Date 11:19 2021/10/18
 * @Description {
 *   维修操作记录
 * }
 * @Author lsay
 **/
@Data
public class MalFunctionHistoryVO {

	/**
	 * 维修操作记录id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 计划id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long planId;

	/**
	 * 点检部件名称集合 多个&&隔开
	 */
	private String partNames;

	/**
	 * 点检部件id集合 多个逗号隔开
	 */
	private String partIds;

	/**
	 * 层站id集合
	 */
	private String floorStandIds;

	/**
	 * 层站名称集合
	 */
	private String floorStandNames;

	/**
	 * 1-设备检修 2-部件更换
	 */
	private Integer disposeType;

	/**
	 * 处理结束时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date disposeEndDate;

	/**
	 * 处理图片
	 */
	@TableField(value = "dispose_img_url",typeHandler = JacksonTypeHandler.class)
	private List<HashMap<String,String>> disposeImgUrl;

	/**
	 * 处理描述
	 */
	private String disposeDesc;

	/**
	 * 用户id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long userId;

	/**
	 * 维修详情id
	 */
	@TableField(value = "works_id")
	private Long worksId;

	/**
	 * 问题原因
	 */
	private String faultReasonKey;
	private String faultReasonName;
	private List<String> wxFaultCauseNames;

	/**
	 * 问题责任
	 */
	private String faultReasonWhoKey;
	private String faultReasonWhoName;
	private List<String> wxFaultTypeNames;
	/**
	 * 问题分类
	 */
	private String faultReasonClassifiedKey;
	private String faultReasonClassifiedName;

	/**
	 * 紧急程度
	 */
	private Integer emerProcType;

	@ApiModelProperty("子工单id")
	private Long childPlanId;

	private List<CheckHistoryRecordVO> malfunctionRecordVO;

	private List<MaintainPartsWork> maintainPartsWorks;

	/**
	 * 子工单信息
	 */
	@TableField(exist = false)
	private CheckChildPlanVo checkChildPlan;


}
